.class public Lcom/waiqin365/base/login/mainview/draggridview/a;
.super Landroid/widget/BaseAdapter;

# interfaces
.implements Lcom/waiqin365/base/login/mainview/draggridview/h;


# instance fields
.field public a:I

.field private b:Ljava/util/ArrayList;

.field private c:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    iput-object p1, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->c:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-direct {p0}, Lcom/waiqin365/base/login/mainview/draggridview/a;->b()V

    return-void
.end method

.method private b()V
    .locals 8

    const/4 v7, 0x2

    const/4 v2, 0x0

    const/4 v6, 0x3

    const/4 v5, 0x1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ltz v0, :cond_3

    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    move v1, v2

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/c/g;

    iget v4, v0, Lcom/waiqin365/base/login/c/g;->l:I

    if-gez v4, :cond_0

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_0
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    new-instance v0, Lcom/waiqin365/base/login/c/g;

    invoke-direct {v0}, Lcom/waiqin365/base/login/c/g;-><init>()V

    iput v2, v0, Lcom/waiqin365/base/login/c/g;->l:I

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->c:Landroid/content/Context;

    const v1, 0x7f0808a7

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0, v6}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;I)I

    move-result v0

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-instance v2, Lcom/waiqin365/base/login/c/g;

    invoke-direct {v2}, Lcom/waiqin365/base/login/c/g;-><init>()V

    iput v5, v2, Lcom/waiqin365/base/login/c/g;->l:I

    const/4 v4, 0x4

    if-ne v0, v4, :cond_6

    rem-int/lit8 v0, v1, 0x4

    if-ne v0, v5, :cond_4

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_2
    :goto_1
    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    iput-object v3, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    :cond_3
    return-void

    :cond_4
    rem-int/lit8 v0, v1, 0x4

    if-ne v0, v7, :cond_5

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_5
    rem-int/lit8 v0, v1, 0x4

    if-ne v0, v6, :cond_2

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_6
    if-ne v0, v6, :cond_2

    rem-int/lit8 v0, v1, 0x3

    if-ne v0, v5, :cond_7

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_7
    rem-int/lit8 v0, v1, 0x3

    if-ne v0, v7, :cond_2

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1
.end method


# virtual methods
.method public a()Ljava/util/ArrayList;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    return-object v0
.end method

.method public a(I)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    invoke-virtual {p0}, Lcom/waiqin365/base/login/mainview/draggridview/a;->notifyDataSetChanged()V

    return-void
.end method

.method public a(ILjava/lang/Object;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    check-cast p2, Lcom/waiqin365/base/login/c/g;

    invoke-virtual {v0, p1, p2}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    invoke-virtual {p0}, Lcom/waiqin365/base/login/mainview/draggridview/a;->notifyDataSetChanged()V

    return-void
.end method

.method public b(I)Z
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/c/g;

    iget v0, v0, Lcom/waiqin365/base/login/c/g;->l:I

    if-ltz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5

    const/4 v3, 0x0

    const/16 v4, 0x8

    if-nez p2, :cond_1

    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->c:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030099

    invoke-virtual {v0, v1, p3, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    new-instance v2, Lcom/waiqin365/base/login/mainview/draggridview/b;

    invoke-direct {v2, p0}, Lcom/waiqin365/base/login/mainview/draggridview/b;-><init>(Lcom/waiqin365/base/login/mainview/draggridview/a;)V

    invoke-virtual {v0, v2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v1, 0x7f0c0374

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->a:Landroid/view/View;

    const v1, 0x7f0c0376

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->b:Landroid/widget/ImageView;

    const v1, 0x7f0c0377

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->c:Landroid/widget/TextView;

    const v1, 0x7f0c037a

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->d:Landroid/widget/LinearLayout;

    const v1, 0x7f0c0379

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->e:Landroid/widget/ImageView;

    const v1, 0x7f0c0378

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, v2, Lcom/waiqin365/base/login/mainview/draggridview/b;->f:Landroid/widget/LinearLayout;

    move-object v1, v2

    move-object p2, v0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/c/g;

    iget v2, v0, Lcom/waiqin365/base/login/c/g;->l:I

    if-nez v2, :cond_2

    iget-object v0, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->a:Landroid/view/View;

    invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iput p1, p0, Lcom/waiqin365/base/login/mainview/draggridview/a;->a:I

    :cond_0
    :goto_1
    return-object p2

    :cond_1
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/mainview/draggridview/b;

    move-object v1, v0

    goto :goto_0

    :cond_2
    iget v2, v0, Lcom/waiqin365/base/login/c/g;->l:I

    if-lez v2, :cond_3

    iget-object v0, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->a:Landroid/view/View;

    invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_1

    :cond_3
    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->a:Landroid/view/View;

    invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V

    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v3

    invoke-virtual {v3}, Lcom/fiberhome/gaea/client/c/b;->g()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "apps"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v3

    iget-object v3, v3, Lcom/fiberhome/gaea/client/c/b;->e:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "/image/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    iget-object v3, v0, Lcom/waiqin365/base/login/c/g;->d:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    if-eqz v2, :cond_4

    iget-object v3, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->b:Landroid/widget/ImageView;

    invoke-virtual {v3, v2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    :goto_2
    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->c:Landroid/widget/TextView;

    iget-object v3, v0, Lcom/waiqin365/base/login/c/g;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    sget-object v2, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;

    sget-object v3, Lcom/fiberhome/gaea/client/c/b;->d:Ljava/util/Locale;

    invoke-virtual {v2, v3}, Ljava/util/Locale;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_5

    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->c:Landroid/widget/TextView;

    const/high16 v3, 0x41500000    # 13.0f

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextSize(F)V

    :goto_3
    iget-boolean v0, v0, Lcom/waiqin365/base/login/c/g;->m:Z

    if-nez v0, :cond_0

    iget-object v0, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->f:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto/16 :goto_1

    :cond_4
    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->b:Landroid/widget/ImageView;

    const v3, 0x7f0200ee

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_2

    :cond_5
    iget-object v2, v1, Lcom/waiqin365/base/login/mainview/draggridview/b;->c:Landroid/widget/TextView;

    const/high16 v3, 0x41600000    # 14.0f

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextSize(F)V

    goto :goto_3
.end method

.method public notifyDataSetChanged()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/base/login/mainview/draggridview/a;->b()V

    invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetChanged()V

    return-void
.end method
